#ifndef TERRABRUSH_H
#define TERRABRUSH_H

class TerraBrush
{
public:
    TerraBrush();

    // 处理光标按下
    void begin(double px, double py, int flag = 1);

    // 处理光标移动
    void move(double px, double py);

    // 处理光标抬起
    void end(double px, double py);

    // 绘制
    void draw(double px, double py);

    // 擦除
    void erase(double px, double py);

private:
    // 绘制半径
    double radius = 8;

    // 绘制状态标志
    bool _draw_flag = 0;

    int _flag;
};

#endif // TERRABRUSH_H
